home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
turbovis
/
tvtool17.zip
/
ACTLIB.ZIP
/
TOOLS.ZIP
/
MKPATH.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-02-25
|
478b
|
30 lines
/* Copyright (C) 1993 Marc Stern (internet: stern@mble.philips.be) */
#include "tools.h"
#include <string.h>
#include <direct.h>
/*
* mkpath()
*
* Input: dir - the directory to be created
*
* Comments: creates destination directory
*/
int mkpath(char *dir)
{ char *p;
for ( p = dir; p = strchr(p, '\\'); *p++ = '\\' )
{
*p = '\0';
mkdir( dir );
}
if ( mkdir(dir) == -1 ) return -1;
return 0;
}